<?php
//echo '<pre>';
//print_r($listcategory);
//echo '<pre/>';
?>

<form action="index.php?r=admin/category/insertcategory" method="post">
    <div class="form-group">
        <label>Name</label>
        <input class="form-control" style="width: 300px" name="categoryname">
        <p class="help-block">tên danh mục</p>
    </div>
    <div class="form-group ">
        <label>Danh mục con của</label>
        <select name="parent_id">
            <?php foreach ($listcategory as $key => $value){
            ?>
            <option value="<?php echo $value['id'];?>"><?php echo $value['category_name'];?></option>
            <?php
            }?>
        </select>
    </div>


    <div class="form-group">
        <div class="form-group">
            <label>Status</label>
            <div class="radio">
                <label>
                    <input type="radio" name="status" id="optionsRadios" value="1" checked> hiện
            </div>
            <div class="radio">
                <label>
                    <input type="radio" name="status" id="optionsRadios2" value="0">ẩn
                </label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <input type="submit" name="submit" value="submit">
    </div>
</form>